<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableOrders extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orders', function (Blueprint $table) {
            $table->increments('oid');
            $table->char('ordsn', '15')->default(' ');
            $table->integer('uid')->default(0);
            $table->char('openid', 32)->default(' ');
            $table->string('xm', 20)->default(' ');
            $table->string('address', 60)->default(' ');
            $table->integer('tel')->default(0);
            $table->integer('money')->default(0);
            $table->tinyInteger('ispay')->default(0);
            $table->timestamp('ordtime')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('orders');
    }
}
